import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/layout'

Vue.use(VueRouter)

const routes = [
	{
		path: '/',
		redirect: '/index',
		component: Layout,
		children: [
			{
				path: 'index',
				name: 'Index',
				component: () => import('@/views/index')
			}
		]
	},
	// 实有人口
	{
		path: '/syrk',
		redirect: '/syrk/hjrk',
		component: Layout,
		name: 'Syrk',
		children: [
			{
				path: 'hjrk',
				name: 'HJRK',
				component: () => import('@/views/syrk/hjrk/index')
			},
			{
				path: 'ldrk',
				name: 'LDRK',
				component: () => import('@/views/syrk/ldrk/index')
			},
			{
				path: 'jwrk',
				name: 'JWRK',
				component: () => import('@/views/syrk/jwrk/index')
			},
			{
				path: 'gary',
				name: 'GARY',
				component: () => import('@/views/syrk/gary/index')
			},
		]
	},
	// 重点人员
	{
		path: '/zdry',
		redirect: '/zdry/sjry',
		component: Layout,
		name: 'ZDRY',
		children: [
			{
				path: 'sjry',
				name: 'SJRY',
				component: () => import('@/views/zdry/sjry/index')
			},
			{
				path: 'sdry',
				name: 'SDRY',
				component: () => import('@/views/zdry/sdry/index')
			},
			{
				path: 'jsbr',
				name: 'JSBR',
				component: () => import('@/views/zdry/jsbr/index')
			},
			{
				path: 'xmsfry',
				name: 'XMSFRY',
				component: () => import('@/views/zdry/xmsfry/index')
			},
			{
				path: 'zdqsn',
				name: 'ZDQSN',
				component: () => import('@/views/zdry/zdqsn/index')
			},
			{
				path: 'xfry',
				name: 'XFRY',
				component: () => import('@/views/zdry/xfry/index')
			},
		]
	},
	// 村社信息
	{
		path: '/csxx',
		redirect: '/csxx/csxx',
		component: Layout,
		name: 'Csxx',
		children: [
			{
				path: 'csxx',
				name: 'CSXX',
				component: () => import('@/views/csxx/csxx/index')
			},
			{
				path: 'mfxx',
				name: 'MFXX',
				component: () => import('@/views/csxx/mfxx/index')
			},
			{
				path: 'fwxx',
				name: 'FWXX',
				component: () => import('@/views/csxx/fwxx/index')
			},
			{
				path: 'xqxx',
				name: 'XQXX',
				component: () => import('@/views/csxx/xqxx/index')
			},
		]
	},
	// 数据统计
	{
		path: '/sjtj',
		redirect: '/sjtj/zdryxx',
		component: Layout,
		name: 'Sjtj',
		children: [
			{
				path: 'zdryxx',
				name: 'ZDRYXX',
				component: () => import('@/views/sjtj/zdryxx/index')
			},
		]
	},
	// 组织管理
	{
		path: '/zzgl',
		redirect: '/zzgl/jxcs',
		component: Layout,
		name: 'Zzgl',
		children: [
			{
				path: 'jxcs',
				name: 'JXCS',
				component: () => import('@/views/zzgl/jxcs/index')
			},
			{
				path: 'zdcs',
				name: 'ZDCS',
				component: () => import('@/views/zzgl/zdcs/index')
			},
		]
	},
	// 事件管理
	{
		path: '/sjgl',
		name: 'Sjgl',
		component: Layout,
		children: [
			{
				path: 'sjgl',
				name: 'SJGL',
				component: () => import('@/views/sjgl/sjgl/index')
			}
		]
	}

]

const router = new VueRouter({
	routes
})

export default router
